#include "FengGoSo.hpp"

int Search(long * nowBoard, char * sCols, char * sLines)
{
	int i, j, iFind;
	char cLine;
	
	memset(sCols , 0x00, sizeof(sCols ));
	memset(sLines, 0x00, sizeof(sLines));
	iFind = 0; // 0-未找到落子点  1-找到落子点
	for(i = 0, cLine  = 'A'; i < SO_LINES; i++, cLine++){
		for(j = 0; j < SO_LINES; j++){
			if(((nowBoard[i] >> (j * 2)) & 0x0000000000000003) == 0){
				iFind = 1;
				break;
			}
		}
		
		if(iFind == 1)
			break;
	}
	sCols[0] = cLine;
	sprintf(sLines, "%d", j + 1);
	
	return 0;
}
